package com.example.springbootsimple.rest;

import com.example.springbootsimple.util.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author WZW
 * @date 2021-05-22 16:29
 */
@RestController
public class HelloController {

    @GetMapping("/hello")
    public Result hello(@RequestParam(required = false, defaultValue = "world") String name){
        return Result.success(name);
    }

}
